# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=qca
pkgver=2.3.4
pkgrel=1
pkgdesc="Qt cryptographic architecture"
url="https://userbase.kde.org/QCA"
arch="all"
license="LGPL-2.1-or-later"
depends_dev="
	cyrus-sasl-dev
	"
makedepends="$depends_dev
	cmake
	doxygen
	qt5-qtbase-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc lib$pkgname:libs"
source="https://download.kde.org/stable/qca/$pkgver/qca-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DWITH_cyrus-sasl_PLUGIN=yes
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

libs() {
	default_libs
	amove usr/lib/qca-qt5
}

sha512sums="
af27338b5c018d39c8c745b63691dec3914e29ff79347ab338f4391ee1dc9832d158b222bc9ef6c7681cf4b2893a38829a4daadf1d53622d6947de2efeb880a8  qca-2.3.4.tar.xz
"
